VT-d: don't disable VT-d engine in suspend for security purpose
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 24 Jun 2009 10:15:31 +0000 (11:15 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 24 Jun 2009 10:15:31 +0000 (11:15 +0100)
force_iommu option is used to force enabling and using IOMMU for
security purpose. So when force_iommu is set, it shouldn't disable
VT-d engines in suspend.

Signed-off-by: Weidong Han <weidong.han@intel.com>
xen/drivers/passthrough/vtd/iommu.c

index 25e5fa9c1a84f3ce58bc424f7f5ef52cba84d588..e471e815edd3f12b90830d5d15e20d91965ac1c8 100644 (file)
@@ -1877,6 +1877,10 @@ void iommu_suspend(void)
         iommu_state[i][DMAR_FEUADDR_REG] =
             (u32) dmar_readl(iommu->reg, DMAR_FEUADDR_REG);
 
+        /* don't disable VT-d engine when force_iommu is set. */
+        if ( force_iommu )
+            continue;
+
         iommu_disable_translation(iommu);
 
         if ( iommu_intremap )